package exception;

import org.junit.Test;

/**
 * @author jiangwz
 * @create 2021/8/4.
 */
public class TestException {

    @Test
    public void test01() {

        try {
            int i = 3 / 0;
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println(e.getClass().isAssignableFrom(ArithmeticException.class));
            System.out.println(e.getClass().isAssignableFrom(RuntimeException.class));
        }
    }
}
